import type { RouteRecordRaw } from 'vue-router';

import { BasicLayout } from '#/layouts';

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'carbon:cloud-monitoring',
      keepAlive: true,
      order: 1000,
      title: '会员管理',
      authority: ['1', '3'],
    },
    name: 'topup',
    path: '/topup',
    children: [
      {
        meta: {
          title: '充值列表',
          authority: ['3'],
        },
        name: 'topupList',
        path: '/topup/list',
        component: () => import('#/views/topup/index.vue'),
      },
      {
        meta: {
          title: '推广链接',
          authority: ['1'],
        },
        name: 'popularize',
        path: '/popularize/list',
        component: () => import('#/views/popularize/index.vue'),
      },
      {
        meta: {
          title: '抖音佣金',
          authority: ['1'],
        },
        name: 'brokerage',
        path: '/brokerage/list',
        component: () => import('#/views/brokerage/douyin.vue'),
      },
      {
        meta: {
          title: '配置列表',
          authority: ['3'],
        },
        name: 'dict',
        path: '/dict/list',
        component: () => import('#/views/dict/index.vue'),
      },
    ],
  },
];

export default routes;
